Appendix 6 - Mathematica™

This section will only be of interest to those familiar with Mathematica™. It compares the syntax of the two languages.

On the surface, ReWrite looks somewhat similar to Mathematica™ . However there are some very important differences:

•   Mathematica™  is more like a functional language - it operates in a completely different way to ReWrite. It has things like fixed point evaluation, requires garbage collection etc.

•  Mathematica™  is interpreted whereas ReWrite is compiled - where they do operate similarly, ReWrite is much faster. This does however make Mathematica™  more flexible for many applications.

•  Mathematica™  has a large collection of powerful functions and libraries to provide even more, whereas ReWrite is nearly minimal.

   Even given the above, there is some similarity between ReWrite and part of Mathematica™ . Functions defined in Mathematica™  with := can be converted to and from ReWrite in the following way:

   Remember that although they look similar and may act similarly, the evaluation is done completely differently!
   It would be easy to design a parser to convert one to the other, or indeed to use this syntax for ReWrite. However my notation suits my needs better, particularly in that my ReWrite code doesn't use token (symbols) as much as parameters, so the tokens carry the extra character ( ` ) whereas in Mathematica™ the parameters do ( _ ).